The folder "LP Iran Sanctions Codes" includes the codes to replicate the results presented in the paper by 

Laudati, Dario and M. Hashem Pesaran. "Identifying the Effects of Sanctions on the Iranian Economy Using Newspaper Coverage." Journal of Applied Econometrics, forthcoming. 

This folder contains the following information:

	- One main R file "master_code.R". This file calls a number of subroutines in order to maximize the clarity of the codes. 
		- The code produces: Descriptive statistics for the sanctions intensity indicator ("s_descriptives.R");  AR(1) and AR(2) estimates for the sanctions intensity variable and global output growth ("ar_regressions.R");  SVAR estimates under multiple orderings and robustness checks ("svar_models.R", "svar_model_robustness_checks.R"), the same SVAR tables previously mentioned with White (1980) heteroskedastic-consistent standard errors ("svar_models_SErobust.R", "svar_model_robustness_checks_SErobust.R"); and the reduced form results for the effect of sanctions on Iran's output growth ("single_equations_models.R", "single_equations_models_SErobust.R"). The files are provided with comments that help navigate through the documents.
		- The R codes allow to obtain the results directly in TeX format, which can then be retrieved in the folder "LP Iran Sanctions Results".

	- The MATLAB codes "irfs_main.m", "fevds_main1Qshocks.m" and "fevds_main_CumSan.m", which produce the impulse response analyses and forecast error variance decompositions (when sanctions are shocked one quarters only, or for a number of quarters), respectively, under the SVAR preferred order . The MATLAB files "irfs_altern_order.m", "fevds_altern_order_1Qshocks.m" and "fevd_altern_order_CumSan.m" replicate the previous results when FX returns are placed first in the SVAR model, as per results provided in the online supplement.

	- The code "graphs_irfs_main.m", which allows to obtain the same IRFs graphs of the paper under the preferred specification; and the file "graphs_irfs_altern_order.m", which produces the IRFs plots for the alternative ordering specification. The two codes use the output created by the "irfs_main.m" and "irfs_altern_order.m" files previously described, therefore it is necessary to run these two codes before one can obtain the related graphs.

	- The file "datamaster.mat" is the MATLAB analogue of the data set in the Excel file "LP Iran Sanctions Data/data_master_quarterly.xlsx" polished to be ready to use by the aforementioned MATLAB algorithms.

Details of data sources and their construction are provided in the online supplement of the paper included in the paper cited above.

For replication of the results, the R codes should be run using R version 4.0.2, and the MATLAB codes should be run using the R2022a version.

Please acknowledge the use of data, codes, or the paper by citing the version given above.

Please e-mail Dario Laudati (laudati@usc.edu) for any doubts or inquiries.